package com.avcdata.national.network;

import android.util.Log;

/**
 * TODO<Log辅助类>
 * <p>
 * 开发阶段将下面LOG_LEVEL 设置为6这样所有的log都能显示，在发布的时候我们将LOG_LEVEL
 * <p>
 * 设置为0.这样log就非常方便管理了
 *
 * @author JiangJian
 * @data: 2014-4-28 下午3:17:17
 * @version: V1.0
 */
public class BaseLog {

    private static int LOG_LEVEL = 6;
    private static int ERROR = 1;
    private static int WARN = 2;
    private static int INFO = 3;
    private static int DEBUG = 4;
    private static int VERBOS = 5;

    public static void e(String tag, String msg) {
        if (LOG_LEVEL > ERROR)
            Log.e(tag, msg);
    }

    public static void w(String tag, String msg) {
        if (LOG_LEVEL > WARN)
            Log.w(tag, msg);
    }

    public static void i(String tag, String msg) {
        if (LOG_LEVEL > INFO)
            Log.i(tag, msg);
    }

    public static void d(String tag, String msg) {
        if (LOG_LEVEL > DEBUG)
            Log.d(tag, msg);
    }

    public static void v(String tag, String msg) {
        if (LOG_LEVEL > VERBOS)
            Log.v(tag, msg);
    }
}
